package springcloud.easybuy.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springcloud.easybuy.api.NewsServiceClient;
import springcloud.easybuy.entity.EasybuyNews;

import javax.annotation.Resource;
import java.util.List;

//@Controller
@RestController
public class NewsController {

    @Resource
    private NewsServiceClient  newsServiceClient;
    @RequestMapping("/news/queryAll")
    public List<EasybuyNews> queryAll(){
        return newsServiceClient.queryAll();
    }
}
